package cn.edu.cqut.entity;

import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.extension.activerecord.Model;
import com.baomidou.mybatisplus.annotation.TableId;
import java.io.Serializable;

/**
 * <p>
 * 
 * </p>
 *
 * @author HQYJ
 * @since 2020-06-24
 */
public class Contact extends Model<Contact> {

    private static final long serialVersionUID=1L;

    /**
     * 联系人编号
     */
    @TableId(value = "con_no", type = IdType.AUTO)
    private Integer conNo;

    /**
     * 客户编号
     */
    private Integer cusNo;
    
    @TableField(exist = false)
    private String cusName;

    /**
     * 联系人姓名
     */
    private String conName;

    /**
     * 联系人性别(1-男，2-女)
     */
    private Integer conSex;

    /**
     * 联系人职位
     */
    private String conPosition;

    /**
     * 联系人电话
     */
    private String conPhone;

    /**
     * 联系人备注信息
     */
    private String conRemark;

    @TableField(exist = false)//这个属性在数据表里面没有映射字段
    private String conSexString;
    

    @TableField(exist = false)
    private String cusNoString;
    
    
    @TableField(exist = false)
    private String conPositionString;
    
	public String getCusNoString() {
		return cusNoString;
	}

	
	public String getConSexString() {
    	String ret="";
    	switch (conSex) {
		case 1: {
			ret="男";
			break;
		}
		case 0: {
			ret="女";
			break;
		}
    	}
		return ret;
	}
    
    public Integer getConNo() {
        return conNo;
    }

    public void setConNo(Integer conNo) {
        this.conNo = conNo;
    }

    public Integer getCusNo() {
        return cusNo;
    }

    public void setCusNo(Integer cusNo) {
        this.cusNo = cusNo;
    }

    public String getConName() {
        return conName;
    }

    public void setConName(String conName) {
        this.conName = conName;
    }

    public Integer getConSex() {
        return conSex;
    }

    public void setConSex(Integer conSex) {
        this.conSex = conSex;
    }

    public String getConPosition() {
        return conPosition;
    }

    public void setConPosition(String conPosition) {
        this.conPosition = conPosition;
    }

    public String getConPhone() {
        return conPhone;
    }

    public void setConPhone(String conPhone) {
        this.conPhone = conPhone;
    }

    public String getConRemark() {
        return conRemark;
    }

    public void setConRemark(String conRemark) {
        this.conRemark = conRemark;
    }

    @Override
    protected Serializable pkVal() {
        return this.conNo;
    }

  


	public String getCusName() {
		return cusName;
	}


	public void setCusName(String cusName) {
		this.cusName = cusName;
	}


	@Override
    public String toString() {
        return "Contact{" +
        "conNo=" + conNo +
        ", cusNo=" + cusNo +
        ", conName=" + conName +
        ", conSex=" + conSex +
        ", conPosition=" + conPosition +
        ", conPhone=" + conPhone +
        ", conRemark=" + conRemark +
        "}";
    }
}
